package com.baizan.daka.mvp.model

import com.baizan.daka.mvp.model.bean.TaskInfoBean
import com.baizan.daka.net.BasePageResponse
import com.baizan.daka.net.bean.BasePageParam
import com.baizan.daka.net.bean.MyTaskBean
import com.baizan.daka.net.bean.TaskParamBean
import com.baizan.daka.util.SchedulerUtils
import com.hazz.kotlinmvp.net.BaseResponse
import com.hazz.kotlinmvp.net.RetrofitManager
import io.reactivex.Observable

class MyTaskModel {

    fun taskingList(
        pageNo: Int,
        taskState: Int
    ): Observable<BaseResponse<BasePageResponse<TaskInfoBean>>> {
        val basePageParam =
            BasePageParam(pageNo, MyTaskBean(null, null, taskState))
        return RetrofitManager.service.userTaskList(
            basePageParam
        ).compose(SchedulerUtils.ioToMain())
    }
}